import request from '@/utils/request'

// 获取用户信息

export function account() {
    return request({
        url: 'api/account/account',
        method: 'get'
    })
}
export function userInfo() {
    return request({
        url: 'api/user/userInfo',
        method: 'get'
    })
}
export function configPayList() {
    return request({
        url: 'api/remittance/configPayList ',
        method: 'get'
    })
}
export function customerserviceList(params) {
    return request({
        url: 'api/index/customerserviceList',
        method: 'get',
        params
    })
}
export function tradePay(data) {
    return request({
        url: 'api/trade/tradePay',
        method: 'post',
        data
    })
}
export function cancelTrade(data) {
    return request({
        url: 'api/trade/cancelTrade',
        method: 'post',
        data
    })
}
export function orderAppeal(data) {
    return request({
        url: 'api/trade/orderAppeal',
        method: 'post',
        data
    })
}
export function confirmOrder(data) {
    return request({
        url: 'api/trade/confirmOrder',
        method: 'post',
        data
    })
}
export function userInfoCommit(data) {
    return request({
        url: 'api/user/userInfoCommit',
        method: 'post',
        data
    })
}
export function tradeDetail(params) {
    return request({
        url: 'api/trade/tradeDetail',
        method: 'get',
        params
    })
}
export function lockOffer(data) {
    return request({
        url: 'api/offer/lockOffer',
        method: 'post',
        data
    })
}
export function information(data) {
    return request({
        url: 'api/user/information',
        method: 'post',
        data
    })
}
export function drawconfig(data) {
    return request({
        url: 'api/draw/config',
        method: 'post',
        data
    })
}
export function drawdraw(data) {
    return request({
        url: 'api/draw/draw',
        method: 'post',
        data
    })
}

export function userwallet(params) {
    return request({
        url: 'api/user/wallet',
        method: 'get',
        params
    })
}

export function updatePayPassword(data) {
    return request({
        url: 'api/user/updatePayPassword',
        method: 'post',
        data
    })
}
export function offerConfigList(data) {
    return request({
        url: 'api/offer/offerConfigList',
        method: 'post',
        data
    })
}

export function usersend(params) {
    return request({
        url: 'api/mail/usersend',
        method: 'get',
        params
    })
}
 export function download(data) {
   return request({
     url: 'api/index/download',
     method: 'post',
     data
   })
 }
export function userReceive(params) {
    return request({
        url: 'api/mail/userReceive',
        method: 'get',
        params
    })
}

export function usershare(params) {
    return request({
        url: 'api/user/share',
        method: 'get',
        params
    })
}
export function noticeList(params) {
    return request({
        url: 'api/index/noticeList',
        method: 'get',
        params
    })
}
export function homePage(params) {
    return request({
        url: 'api/index/homePage',
        method: 'get',
        params
    })
}
export function editUserInfo(data) {
    return request({
        url: 'api/user/editUserInfo',
        method: 'post',
        data
    })
}

export function userauth(data) {
    return request({
        url: 'api/user/auth',
        method: 'post',
        data
    })
}
export function dhconfigConvertList(params) {
    return request({
        url: 'api/convert/configConvertList',
        method: 'get',
        params
    })
}
export function convert(data) {
    return request({
        url: 'api/convert/convert',
        method: 'post',
        data
    })
}
// 总资产
export function allAccount() {
    return request({
        url: 'api/account/allAccount',
        method: 'get'
    })
}
// 收支列表
export function billList( page,pagesize,type) {
    return request({
        url: 'api/account/billList',
        method: 'get',
        params:{
            page,pagesize,type
        }
    })
}
// 团队
export function teamInfo() {
    return request({
        url: 'api/user/teamInfo',
        method: 'get'
    })
}
// 收益记录
export function userAccount(params) {
    return request({
        url: 'api/user/userAccount',
        method: 'get',
        params
    })
}
export function incomeList(params) {
    return request({
        url: 'api/account/incomeList',
        method: 'get',
        params
    })
}
// 修改支付密码
export function resetPayPassword(data) {
    return request({
        url: 'api/user/resetPayPassword',
        method: 'post',
        data
    })
}
export function updatePassword(data) {
    return request({
        url: 'api/user/updatePassword',
        method: 'post',
        data
    })
}
// 登录密码
export function resetPassword(data) {
    return request({
        url: 'api/user/resetPassword',
        method: 'post',
        data
    })
}
// 发送短信
export function sendSms() {
    return request({
        url: 'api/user/sendSms',
        method: 'post'
    })
}
// 兑换
export function convertCommit(data) {
    return request({
        url: 'api/convert/convertCommit',
        method: 'post',
        data
    })
}
export function configConvertList(params) {
    return request({
        url: 'api/convert/configConvertList',
        method: 'get',
        params
    })
}
export function convertRecordList( page,pagesize) {
    return request({
        url: 'api/convert/convertRecordList',
        method: 'get',
        params:{
            page,pagesize
        }
    })
}

export function createOrder(params) {
    return request({
        url: 'api/goods/createOrder',
        method: 'get',
        params
    })
}
export function usershopList(params) {
    return request({
        url: 'api/goods/shopList',
        method: 'get',
        params
    })
}

export function usergoodsList(params) {
    return request({
        url: 'api/goods/goodsList',
        method: 'get',
        params
    })
}



// 邮箱
export function sendEmail(data) {
    return request({
        url: 'api/login/sendEmail',
        method: 'post',
        data
    })
}
export function emailAuth(data) {
    return request({
        url: 'api/mail/emailAuth',
        method: 'post',
        data
    })
}
// 汇款
export function remitCommit(data) {
    return request({
        url: 'api/remittance/remittance',
        method: 'post',
        data
    })
}
export function remitConfig() {
    return request({
        url: 'api/remittance/configRemittanceList',
        method: 'get'
    })
}
export function remitList( page,pagesize,currency_id) {
    return request({
        url: 'api/remittance/remittanceRecordList',
        method: 'get',
        params:{
            page,pagesize,currency_id
        }
    })
}
// 提现
export function configDrawList(params) {
    return request({
        url: 'api/draw/configDrawList',
        method: 'get',
        params
    })
}
export function drawCommit(data) {
    return request({
        url: 'api/draw/drawCommit',
        method: 'post',
        data
    })
}
export function drawRecord( page,pagesize,currency_id) {
    return request({
        url: 'api/draw/drawRecord',
        method: 'get',
        params:{
            page,pagesize,currency_id
        }
    })
}
// 图文介绍
export function textDesc(type) {
    return request({
        url: 'api/treaty/treatyDetail',
        method: 'get',
        params:{
           type
        }
    })
}
// 修改手机号/邮箱
export function bindMember(data) {
    return request({
        url: 'api/user/bindMember',
        method: 'post',
        data
    })
}
// 实名认证
export function authRule(data) {
    return request({
        url: 'api/user/authRule',
        method: 'post',
        data
    })
}
// 搬砖列表
export function bricksList() {
    return request({
        url: 'api/bricks/bricksList',
        method: 'get'
    })
}
// 开启
export function openBricks(data) {
    return request({
        url: 'api/bricks/openBricks',
        method: 'post',
        data
    })
}
// 投资
export function addBricks(data) {
    return request({
        url: 'api/bricks/addBricks',
        method: 'post',
        data
    })
}
// 详情
export function incomeRecord(record_id) {
    return request({
        url: 'api/bricks/incomeRecord',
        method: 'get',
        params:{
            record_id
        }
    })
}
// 退本
export function refund(record_id) {
    return request({
        url: 'api/bricks/refund',
        method: 'post',
        params:{
            record_id
        }
    })
}
// 客服留言
export function sendMail(data) {
    return request({
        url: 'api/mail/sendMail',
        method: 'post',
        data
    })
}